package day06;

public class Rectangle extends Shape {
    private double width;
    private double height;

    public Rectangle() {
        super();
    }

    public Rectangle(double width, double height, String color) {
        super(color);
        this.width = width;
        this.height = height;
    }

    @Override
    public double getArea() {
        return width * height;
    }

    @Override
    public double getPer() {
        return 2 * (width + height);
    }

    @Override
    public void showAll() {
        System.out.println("Rectangle:");
        System.out.println("Area: " + getArea());
        System.out.println("Perimeter: " + getPer());
        System.out.println("Color: " + getColor());
    }
}
